<template>
  <div class="divclass1">
    <h2>Home {{ $route.params.id }}</h2>
      这个是个默认home组件
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
        
    }
  },
  beforeRouteUpdate (to, from, next) {
    // react to route changes...
    // don't forget to call next()
    console.log(to);
    console.log(to);
    next();
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
    .divclass1 {
        height: 600px;
        width: 600px;
        border:1px solid red;
        margin: 0 auto;
    }
</style>
